from ctypes import *
import time
import os

msvcrt = cdll.msvcrt
counter = 0

while 1:
    pid = os.getpid()
    msvcrt.printf("Loop iteration %d! pid: %d\n",counter, c_int(pid))
    time.sleep(2)
    counter += 1